package io.geekidea.boot.config;

import io.geekidea.boot.auth.cache.LoginCache;

public abstract class BaseDataPermissionFilter<T> implements DataPermissionFilter<T> {
    @Override
    public boolean filter(T data) {
        if (LoginCache.get().isAdmin()) {
            return true;
        }
        return filter0(data);
    }

    abstract boolean filter0(T data);
}
